🎯 系列目標:用 30 天時間,從零開始打造一個專屬輔大學生的課表生成 Chrome 擴充功能
💻 作者:輔大智慧資安 412580084
📅 Day 29:專案部署與發布
經過前面 28 天的學習與實作,我們已經完成了一個功能完整的輔大課表生成 Chrome 擴充功能。今天我們將把這個專案打包並發布到 GitHub,讓大家可以使用和貢獻這個專案。
首先,我們需要確保專案檔案結構完整且乾淨:
fju-schedule-extension/
├── background.js
├── content.js
├── manifest.json
├── popup.html
├── popup.js
├── schedule.html
├── schedule.js
├── schedule-styles.css
├── libs/
   └── html2canvas.min.js
確保 manifest.json 檔案中的版本號和資訊正確:
{
  "manifest_version": 3,
  "name": "輔大課表生成器",
  "version": "1.0",
  "description": "輔大課表生成器,一鍵產生當學期課表",
  "permissions": [
    "activeTab",
    "scripting",
    "storage",
    "downloads",
    "tabs"
  ],
  "host_permissions": [
    "https://portal.fju.edu.tw/*",
    "http://estu.fju.edu.tw/*"
  ],
  "web_accessible_resources": [
    {
      "resources": [
        "schedule.html", 
        "schedule-styles.css", 
        "schedule.js",
        "download.png",
        "libs/html2canvas.min.js"
      ],
      "matches": ["<all_urls>"]
    }
  ],
  "background": {
    "service_worker": "background.js"
  },
  "action": {
    "default_popup": "popup.html"
  },
  "content_scripts": [
    {
      "matches": [
        "https://portal.fju.edu.tw/*",
        "http://estu.fju.edu.tw/*"
      ],
      "js": ["content.js"]
    }
  ]
}
FJU_Curriculum
 
Git Bash 並加我們的剛剛建立的倉庫克隆下來 git clone https://github.com/AlanTsai2004/FJU_Curriculum.git
將我們寫的專案文件複製到克隆倉庫資料夾下並開啟 Git Bash
初始化 git
git init
git add .
git commit -m "輔大課表生成器 v1.0"
git remote set-url origin https://github.com/AlanTsai2004/FJU_Curriculum.git
git push -u origin main
然後重新整理後我們會看到倉庫成功上傳了
明天是我們自學系列的最後一天,我們將進行自學總結與未來展望,並將專案分享讓大家下載使用